package org.jeecg.modules.yusuan.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.gudingzichan.entity.Gudingzichan;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.yusuan.entity.CaiwuBiaozhun;
import org.jeecg.modules.yusuan.entity.CaiwuNz;

import java.util.List;
import java.util.Map;

/**
 * @Description: caiwu_yusuan
 * @Author: jeecg-boot
 * @Date:   2020-06-15
 * @Version: V1.0
 */
public interface CaiwuNzMapper extends BaseMapper<CaiwuNz> {

    @Select("select count(1) from caiwu_${jingfeiType} where dept_id = '${deptId}' and effective = ${effective}")
    int jingfeiTypeCount(@Param("deptId") String deptId, @Param("jingfeiType")String jingfeiType, @Param("effective") Integer effective);

    IPage<CaiwuNz> myApplyList(Page<CaiwuNz> page, @Param("user") LoginUser user, @Param("caiwuNz") CaiwuNz caiwuNz);

    IPage<CaiwuNz> myTodoTasks(Page<CaiwuNz> page, @Param("user")LoginUser user, @Param("caiwuNz") CaiwuNz caiwuNz);

    IPage<CaiwuNz> myDoneTasks(Page<CaiwuNz> page, @Param("user")LoginUser user, @Param("caiwuNz") CaiwuNz caiwuNz);

}
